package com.wpw.controller;

import com.alibaba.fastjson.JSON;
import com.wpw.mapper.UserMapper;
import com.wpw.model.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Description:
 * @ClassName: UserController
 * @CreateDate: 2020-02-29 16:56
 * @author: wupengwei
 */
@Api(tags="user test")
@RestController
@Slf4j
@CrossOrigin
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @ApiOperation(value="uset test")
    /*@ApiImplicitParams({
            @ApiImplicitParam(name = "phone",paramType = "query", value = "手机号",required = true, dataType = "String"),
            @ApiImplicitParam(name = "captcha",paramType = "query", value = "验证码",required = true, dataType = "String")
    })*/
    @RequestMapping( value = "/apply/rollback", method = { RequestMethod.GET})
    public User getById(){
        return userMapper.selectById(1L);
    }
}